﻿using System.Threading.Tasks;
using Magicodes.ExporterAndImporter.Excel.AspNetCore;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NP.BPMReportPlatform.TalentProfile.Dto;
using Volo.Abp.Application.Dtos;

namespace NP.BPMReportPlatform.TalentProfile
{
    /// <summary>
    /// 人才档案
    /// </summary>
    [Authorize]
    [ApiController]
    [Route("api/talent-profile")]
    public class TalentProfileController : BPMReportPlatformController
    {
        private readonly ITalentProfileService _talentProfileService;

        public TalentProfileController(ITalentProfileService talentProfileService)
        {
            _talentProfileService = talentProfileService;
        }

        /// <summary>
        /// 试用期员结果汇总查询数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("TP/GetTalentProfileResult")]
        public async Task<PagedResultDto<GetTalentProfileResultOutput>> GetAllAsync([FromBody] GetTalentProfileResultInput input)
        {
            return await _talentProfileService.GetTalentProfileResult(input);
        }
    }
}